]> git.r.bdr.sh - rbdr/super-polarity/blame_incremental - Super Polarity/ActorManager.cs
Moves to ActorManager arch + Actor Inherited stuff
[rbdr/super-polarity] / Super Polarity / ActorManager.cs
... / ...
CommitLineData
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5using Microsoft.Xna.Framework;
6using Microsoft.Xna.Framework.Graphics;
7
8namespace SuperPolarity
9{
10 static class ActorManager
11 {
12 static List<Actor> Actors;
13
14 static ActorManager()
15 {
16 Actors = new List<Actor>();
17 }
18
19 static public void CheckIn(Actor actor)
20 {
21 Actors.Add(actor);
22 }
23
24 static public void CheckOut(Actor actor)
25 {
26 Actors.Remove(actor);
27 }
28
29 static public void Update(GameTime gameTime)
30 {
31 foreach (Actor actor in Actors)
32 {
33 actor.Update(gameTime);
34 }
35 }
36
37 static public void Draw(SpriteBatch spriteBatch)
38 {
39 foreach (Actor actor in Actors)
40 {
41 actor.Draw(spriteBatch);
42 }
43 }
44 }
45}